
from langchain_core.messages import HumanMessage, ToolMessage

from chain import ex_test
from graph import graph
# ex_test()

print(graph.get_graph().draw_mermaid())

q = "How should we handle the climate crisis?"
q = 'Agent 设计模式有哪些'
q = 'langgraph入门'
events = graph.stream(
    {"messages": [("user", q)]},
    stream_mode="values",
)
for i, step in enumerate(events):
    print(f"Step {i}")
    step["messages"][-1].pretty_print()



